home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
dll_grph
/
vx3d01
/
3dframes.frm
< prev
next >
Wrap
Text File
|
1995-11-25
|
14KB
|
484 lines
VERSION 4.00
Begin VB.Form frm3DFrames
BorderStyle = 3 'Fixed Dialog
Caption = "VBMax 3D Effects Demo - Frames"
ClientHeight = 5250
ClientLeft = 3315
ClientTop = 3615
ClientWidth = 7275
Height = 5655
Icon = "3DFrames.frx":0000
Left = 3255
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5250
ScaleWidth = 7275
ShowInTaskbar = 0 'False
Top = 3270
Width = 7395
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "Close"
Height = 495
Left = 5520
TabIndex = 28
Top = 4380
Width = 1215
End
Begin VB.PictureBox picFrameAlign
BorderStyle = 0 'None
Height = 1035
Left = 1860
ScaleHeight = 1035
ScaleWidth = 2835
TabIndex = 35
Top = 4080
Width = 2835
Begin VB.OptionButton optAlign
Caption = "Center"
Height = 255
Index = 2
Left = 120
TabIndex = 18
Top = 720
Width = 855
End
Begin VB.OptionButton optAlign
Caption = "Right Justify"
Height = 255
Index = 1
Left = 120
TabIndex = 17
Top = 420
Width = 1275
End
Begin VB.OptionButton optAlign
Caption = "Left Justify"
Height = 255
Index = 0
Left = 120
TabIndex = 16
Top = 120
Value = -1 'True
Width = 1095
End
End
Begin VB.PictureBox picFrameShadow
BorderStyle = 0 'None
Height = 1035
Left = 180
ScaleHeight = 1035
ScaleWidth = 1395
TabIndex = 34
Top = 4080
Width = 1395
Begin VB.OptionButton optShadow
Caption = "Light"
Height = 255
Index = 0
Left = 60
TabIndex = 8
Top = 120
Value = -1 'True
Width = 795
End
Begin VB.OptionButton optShadow
Caption = "Dark"
Height = 255
Index = 1
Left = 60
TabIndex = 9
Top = 480
Width = 795
End
End
Begin VB.PictureBox picFrameStyle
BorderStyle = 0 'None
Height = 2895
Left = 4980
ScaleHeight = 2895
ScaleWidth = 2115
TabIndex = 33
Top = 540
Width = 2115
Begin VB.OptionButton optEffect
Caption = "Normal"
Height = 255
Index = 0
Left = 120
TabIndex = 19
Top = 120
Value = -1 'True
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Raised"
Height = 255
Index = 1
Left = 120
TabIndex = 20
Top = 420
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Recessed"
Height = 255
Index = 2
Left = 120
TabIndex = 21
Top = 720
Width = 1155
End
Begin VB.OptionButton optEffect
Caption = "Embossed Raised"
Height = 255
Index = 3
Left = 120
TabIndex = 22
Top = 1020
Width = 1695
End
Begin VB.OptionButton optEffect
Caption = "Embossed Recessed"
Height = 255
Index = 4
Left = 120
TabIndex = 23
Top = 1320
Width = 1995
End
Begin VB.OptionButton optEffect
Caption = "Floating"
Height = 255
Index = 5
Left = 120
TabIndex = 24
Top = 1620
Width = 915
End
Begin VB.OptionButton optEffect
Caption = "Outline Right"
Height = 255
Index = 6
Left = 120
TabIndex = 25
Top = 1920
Width = 1335
End
Begin VB.OptionButton optEffect
Caption = "Outline Left"
Height = 255
Index = 7
Left = 120
TabIndex = 26
Top = 2220
Width = 1275
End
Begin VB.OptionButton optEffect
Caption = "Projected"
Height = 255
Index = 8
Left = 120
TabIndex = 27
Top = 2520
Width = 1155
End
End
Begin VB.PictureBox picFrameFont
BorderStyle = 0 'None
Height = 2895
Left = 1860
ScaleHeight = 2895
ScaleWidth = 2835
TabIndex = 30
Top = 540
Width = 2835
Begin VB.CheckBox chkStrikeout
Caption = "Strikeout"
Height = 315
Left = 1320
TabIndex = 15
Top = 2520
Width = 1095
End
Begin VB.CheckBox chkUnderline
Caption = "Underline"
Height = 315
Left = 1320
TabIndex = 14
Top = 2160
Width = 1095
End
Begin VB.CheckBox chkItalic
Caption = "Italic"
Height = 315
Left = 1320
TabIndex = 13
Top = 1800
Width = 795
End
Begin VB.CheckBox chkBold
Caption = "Bold"
Height = 315
Left = 1320
TabIndex = 12
Top = 1440
Width = 795
End
Begin VB.ComboBox cboTextSize
Height = 1740
Left = 120
Style = 1 'Simple Combo
TabIndex = 11
Top = 1080
Width = 915
End
Begin VB.ComboBox cboFontNames
Height = 315
Left = 120
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 10
Top = 360
Width = 2535
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Size:"
Height = 195
Left = 120
TabIndex = 32
Top = 840
Width = 345
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Name:"
Height = 195
Left = 120
TabIndex = 31
Top = 120
Width = 465
End
End
Begin VB.PictureBox picFrameColor
BorderStyle = 0 'None
Height = 2895
Left = 180
ScaleHeight = 2895
ScaleWidth = 1395
TabIndex = 29
Top = 540
Width = 1395
Begin VB.OptionButton optColor
Caption = "Black"
ForeColor = &H00000000&
Height = 255
Index = 1
Left = 120
TabIndex = 0
Top = 180
Value = -1 'True
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Red"
ForeColor = &H000000FF&
Height = 255
Index = 2
Left = 120
TabIndex = 1
Top = 480
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Green"
ForeColor = &H0000FF00&
Height = 255
Index = 3
Left = 120
TabIndex = 2
Top = 780
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Yellow"
ForeColor = &H0000FFFF&
Height = 255
Index = 4
Left = 120
TabIndex = 3
Top = 1080
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Blue"
ForeColor = &H00FF0000&
Height = 255
Index = 5
Left = 120
TabIndex = 4
Top = 1380
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Magenta"
ForeColor = &H00FF00FF&
Height = 255
Index = 6
Left = 120
TabIndex = 5
Top = 1680
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "Cyan"
ForeColor = &H00FFFF00&
Height = 255
Index = 7
Left = 120
TabIndex = 6
Top = 1980
Width = 1095
End
Begin VB.OptionButton optColor
Caption = "White"
ForeColor = &H00FFFFFF&
Height = 255
Index = 8
Left = 120
TabIndex = 7
Top = 2280
Width = 1095
End
End
End
Attribute VB_Name = "frm3DFrames"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Dim mo3D As New cls3D
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
For i = 0 To Screen.FontCount - 1
cboFontNames.AddItem Screen.Fonts(i)
Next i
With cboTextSize
.AddItem "8"
.AddItem "10"
.AddItem "12"
.AddItem "14"
.AddItem "20"
.AddItem "24"
.AddItem "26"
.AddItem "32"
End With
mo3D.Style = gnNORMAL
RedrawFrames
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set mo3D = Nothing
Set frm3DFrames = Nothing
End Sub
Sub RedrawFrames()
Cls
With mo3D
.Frame picFrameColor, "Color"
.Frame picFrameAlign, "Alignment"
.Frame picFrameFont, "Font"
.Frame picFrameShadow, "Shadow"
.Frame picFrameStyle, "Effect"
End With
End Sub
Private Sub optColor_Click(Index As Integer)
mo3D.ForeColor = optColor(Index).ForeColor
RedrawFrames
End Sub
Private Sub cboFontNames_Click()
mo3D.FontName = cboFontNames.Text
RedrawFrames
End Sub
Private Sub cboTextSize_Click()
cboTextSize_Change
End Sub
Private Sub cboTextSize_Change()
mo3D.FontSize = Val(cboTextSize.Text)
RedrawFrames
End Sub
Private Sub chkBold_Click()
If chkBold.Value = vbChecked Then
mo3D.FontBold = True
Else
mo3D.FontBold = False
End If
RedrawFrames
End Sub
Private Sub chkItalic_Click()
If chkItalic.Value = vbChecked Then
mo3D.FontItalic = True
Else
mo3D.FontItalic = False
End If
RedrawFrames
End Sub
Private Sub chkStrikeout_Click()
If chkStrikeout.Value = vbChecked Then
mo3D.FontStrikethru = True
Else
mo3D.FontStrikethru = False
End If
RedrawFrames
End Sub
Private Sub optEffect_Click(Index As Integer)
mo3D.Style = Index
RedrawFrames
End Sub
Private Sub optShadow_Click(Index As Integer)
Select Case Index
Case 0: mo3D.Shadow = gnLIGHT_SHADOW
Case 1: mo3D.Shadow = gnDARK_SHADOW
End Select
RedrawFrames
End Sub
Private Sub optAlign_Click(Index As Integer)
mo3D.Alignment = Index
RedrawFrames
End Sub
Private Sub chkUnderline_Click()
If chkUnderline.Value = vbChecked Then
mo3D.FontUnderline = True
Else
mo3D.FontUnderline = False
End If
RedrawFrames
End Sub